home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / audiofile / AFnewfilesetup.z / AFnewfilesetup
Encoding:
Text File  |  2002-10-03  |  8.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp((((3333ddddmmmm))))                                        aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afNewFileSetup - create and initialize an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  13.  
  14.      AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp((((vvvvooooiiiidddd))))
  15.  
  16. RRRREEEETTTTUUUURRRRNNNNEEEEDDDD VVVVAAAALLLLUUUUEEEE
  17.      An opaque AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure initialized to the default configuration
  18.      for a new audio file opened with write access, or for opening a raw
  19.      (headerless) audio file for read access.
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      Use aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp(((()))) to create and initialize an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure.
  23.  
  24.      This structure passes configuration parameters to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm), which
  25.      formats the skeleton for a new file accordingly.
  26.  
  27.      When an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure is no longer needed it should be discarded
  28.      with aaaaffffFFFFrrrreeeeeeeeFFFFiiiilllleeeeSSSSeeeettttuuuupppp(3dm).  Freeing an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp will not affect any
  29.      open AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure.
  30.  
  31.      Configuration parameters include:
  32.  
  33.      -   the desired audio file format
  34.  
  35.      -   the number of audio tracks and the type of sample data stored in each
  36.  
  37.      -   the number of markers allocated for each track
  38.  
  39.      -   the number of instrument configurations (including loop points)
  40.  
  41.      -   the number of loops allocated for each instrument
  42.  
  43.      -   the number, types, and sizes of miscellaneous data chunks (strings,
  44.          etc)
  45.  
  46.      -   integer ID's for tracks, instruments, markers, loops, miscellaneous
  47.          data
  48.  
  49.      For AIFF-C (and AIFF) files, the above list of parameters simplifies a
  50.      bit.  There is always one audio track per file.  There is at most one
  51.      instrument configuration per file, and there are  always two loops per
  52.      instrument.
  53.  
  54.      To initialize the various file configuration parameters stored in an
  55.      AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure, see the initialization routines mentioned below in
  56.      SEE ALSO.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp((((3333ddddmmmm))))                                        aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74. DDDDEEEEFFFFAAAAUUUULLLLTTTT FFFFIIIILLLLEEEE SSSSEEEETTTTUUUUPPPP CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN
  75.      The default parameter values in a new AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure are listed
  76.      here.
  77.      - file format
  78.           defaults to AIFF-C, denoted by the constant AF_FILE_AIFFC
  79.  
  80.      - default audio track
  81.           one track per file,  with track ID AF_DEFAULT_TRACK
  82.  
  83.      - markers for audio track
  84.           four markers with ID's {1,2,3,4}
  85.  
  86.      - interleaved channels for audio track
  87.           2 (stereo)
  88.  
  89.      - sample format for audio track
  90.           two's complement 16-bit linear PCM, given by the constant
  91.           AF_SAMPFMT_TWOSCOMP with width 16
  92.  
  93.      - compression used on audio track
  94.           no compression, specified by the constant AF_COMPRESSION_NONE
  95.  
  96.      - default instrument configuration
  97.           one instrument configuration, with instrument ID AF_DEFAULT_INST
  98.  
  99.      - instrument configuration parameters
  100.           default instrument configuration for AIFF-C (and AIFF) is:
  101.           AF_INST_MIDI_BASENOTE         60  MIDI
  102.           AF_INST_NUMCENTS_DETUNE       0   cents
  103.           AF_INST_MIDI_LONOTE           0   MIDI
  104.           AF_INST_MIDI_HINOTE           127 MIDI
  105.           AF_INST_MIDI_LOVELOCITY       1   MIDI
  106.           AF_INST_MIDI_HIVELOCITY       127 MIDI
  107.           AF_INST_NUMDBS_GAIN           0   dB
  108.           AF_INST_SUSLOOPID             1    loop ID for sustain loop
  109.           AF_INST_RELLOOPID             2    loop ID for release loop
  110.  
  111.      - loops
  112.           two loops with ID's {1,2}
  113.           default mode for each loop is AAAAFFFF____LLLLOOOOOOOOPPPP____MMMMOOOODDDDEEEE____NNNNOOOOLLLLOOOOOOOOPPPP (ignore loop)
  114.  
  115.      For file formats other than AIFF and AIFF-C, a default audio format and
  116.      file configuration (i.e., number of tracks, insts, loops, etc.) is
  117.      generated when aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) or its equivalent is called.  This means
  118.      that an application does not need to initialize any parameters in the
  119.      _s_e_t_u_p structure prior to calling aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) other than the sample
  120.      format itself (see aaaaffffIIIInnnniiiittttFFFFiiiilllleeeeFFFFoooorrrrmmmmaaaatttt(3dm)), unless a custom configuration
  121.      is desired.  The aaaaffffQQQQuuuueeeerrrryyyy(3dm) routine provides a mechanism for retrieving
  122.      informnation about default sample formats and widths for each file
  123.      format, plus information about supported track, inst, loop, marker, and
  124.      misc chunks.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp((((3333ddddmmmm))))                                        aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140. RRRREEEEAAAADDDDIIIINNNNGGGG RRRRAAAAWWWW AAAAUUUUDDDDIIIIOOOO FFFFIIIILLLLEEEESSSS
  141.      When opening raw audio files with read access, i.e., files with no header
  142.      or with unrecognizable header formats, aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) and its related
  143.      routines must be passed a AFfilesetup struct initialized to the exact
  144.      format parameters of the raw file.  Most especially, the file format
  145.      parameter must be set to AAAAFFFF____FFFFIIIILLLLEEEE____RRRRAAAAWWWWDDDDAAAATTTTAAAA for all raw reads, regardless of
  146.      the "actual" header type.
  147.  
  148.      The default values produced by aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp(((()))) are for use when creating
  149.      new files with write-access only.
  150.  
  151. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  152.      afInitFileFormat(3dm), afInitChannels(3dm), afInitLoopIDs(3dm),
  153.      afInitMarkIDs(3dm), afInitMiscIDs(3dm), afInitRate(3dm),
  154.      afInitSampleFormat(3dm)
  155.      afOpenFile(3dm), afFreeFileSetup(3dm)
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.